package com.framework.modules.live.service.impl;

import com.framework.modules.base.entity.SetteleLiveRewardsEntity;
import com.framework.modules.base.entity.StatLiveRewardsEntity;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;

import com.framework.modules.live.dao.LiveRewardsDao;
import com.framework.modules.live.entity.LiveRewardsEntity;
import com.framework.modules.live.service.LiveRewardsService;


@Service("liveRewardsService")
public class LiveRewardsServiceImpl extends ServiceImpl<LiveRewardsDao, LiveRewardsEntity> implements LiveRewardsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<LiveRewardsEntity> page = this.selectPage(
                new Query<LiveRewardsEntity>(params).getPage(),
                new EntityWrapper<LiveRewardsEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public List<SetteleLiveRewardsEntity> selectLiveRewardsSetteleEntity() {
        return this.baseMapper.selectLiveRewardsSetteleEntity();
    }

    @Override
    public List<StatLiveRewardsEntity> statLiveRewardsTopList(Integer startTime, Integer endTime) {
        return this.baseMapper.statLiveRewardsTopList(startTime,endTime);
    }

    @Override
    public List<StatLiveRewardsEntity> statLiveRewardsTopListToHour(Integer startTime, Integer endTime) {
        return this.baseMapper.statLiveRewardsTopListToHour(startTime,endTime);
    }

    @Override
    public List<StatLiveRewardsEntity> getRewardsTopList(String liveRoundId) {
        return this.baseMapper.getRewardsTopList(liveRoundId);
    }

}
